#include "RAT_CustomMesh.h"

namespace RAT_ENGINE
{
	RAT_CustomMesh::RAT_CustomMesh() : id(0), url("")
	{
	}

	RAT_CustomMesh::~RAT_CustomMesh()
	{
	}

	void RAT_CustomMesh::Init(const int argID, const std::string argURL)
	{
		id = argID;
		url = argURL;
	}

	void RAT_CustomMesh::CleanUp()
	{
	}

	int RAT_CustomMesh::GetID() const
	{
		return id;
	}

	std::string RAT_CustomMesh::GetURL() const
	{
		return url;
	}
	
	void RAT_CustomMesh::AddVertex(const RAT_CustomVertex argVertex)
	{
		vertices.push_back(argVertex);
	}

	RAT_CustomVertex RAT_CustomMesh::GetVertex(int argIndex) const
	{
		return vertices[argIndex];
	}

	std::vector<RAT_CustomVertex> RAT_CustomMesh::GetVertices() const
	{
		return vertices;
	}

	void RAT_CustomMesh::PrintIO() const
	{
		std::cout << "ID: " << id << "; URL: " << url << "\nVertices:" <<  std::endl;
		for (unsigned int i = 0; i < vertices.size(); ++i)
		{
			vertices[i].PrintIO();
		}
	}
}